package com.JZ.QM.service;

import com.JZ.QM.common.entity.ComEarningRecordEntity;
import com.JZ.QM.common.entity.PositionDetailEntity;
import com.JZ.QM.common.utils.PageUtils;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * @author: cyc
 * @email cyc@gmail.com
 * @date: 2020/7/8 14:05
 */
public interface ComEarningRecordService extends IService<ComEarningRecordEntity> {
    /**
     * 分页查询
     * @param params
     * @return
     * @throws Exception
     */
    PageUtils queryPage(Map<String, Object> params) throws Exception;
    /**
     * 计算产品收益记录
     * @return
     */
    Boolean caculateComEarning();

    /**
     * 获取组合持仓可视化数据
     * @param accoutId 账户id
     * @return
     */
    HashMap showComEarningRecordForChart(Long accoutId);

    /**
     * 获取用户购买后组合的真正比例
     * @param comBaseId 组合id
     * @return
     */
    ArrayList<PositionDetailEntity> getComPositionDetailItems(Long comBaseId);

}
